-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Add back the Fix for Pipeline variables related customer issues #3043
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Codecov Report
@@ Coverage Diff @@
## master #3043 +/- ##
==========================================
- Coverage 89.39% 89.39% -0.01%
==========================================
Files 197 196 -1
Lines 16672 16656 -16
==========================================
- Hits 14904 14889 -15
+ Misses 1768 1767 -1
Continue to review full report at Codecov.
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
@@ -2340,13 +2342,17 @@ def _map_training_config( | |||
training_job_definition["VpcConfig"] = vpc_config | |||
|
|||
if enable_network_isolation: | |||
training_job_definition["EnableNetworkIsolation"] = True | |||
training_job_definition["EnableNetworkIsolation"] = enable_network_isolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Isnt this redundant, if F will never come here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was caught from a customer reported issue.
enable_network_isolation
can be a Pipeline variable like ParameterBoolean, which is not parsed in compile time (SDK stage).
However, in such case, it will go into this line and hard code a True to it, which means the ParameterBoolean object will be lost in the Pipeline definition and accordingly users are not able to update this parameter in runtime.
dependencies (str): A space-delimited string of paths to custom dependencies. | ||
source_dir (str): The path to a custom source directory. | ||
""" | ||
|
||
# the data directory contains a model archive generated by a previous training job | ||
data_directory = "/opt/ml/input/data/training" | ||
model_path = os.path.join(data_directory, model_archive) | ||
model_path = os.path.join(data_directory, model_archive.split("/")[-1]) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This _repack_model.py
is a script which will be uploaded and executed during Pipeline execution runtime (backend), which means all pipeline variables are correctly parsed to proper type like str at that time.
So it's safe to do the str split in this script.
A corresponding change is in _utils.py
below (link). As we move the str split into the _repack_model.py
, we can clean up those condition check lines in _utils.py
.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
…ws#3043) * Revert "Revert "fix: Fix Pipeline variables related customer issues (aws#2959)" (aws#3041)" This reverts commit 2782f8c. * fix: Include deprecated JsonGet into PipelineVariable Co-authored-by: Dewen Qi <[email protected]>
Issue #, if available:
Description of changes:
fix: Fix Pipeline variables related customer issues
: fix: Fix Pipeline variables related customer issues #2959JsonGet
into thePipelineVariable
Testing done: integ tests
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.